const path = require('path');
module.exports = {
  entry: path.resolve(__dirname, 'src/index.js'),
  // experiments: { outputModule: true },
  output: {
    path: path.resolve(__dirname, 'dist'),
    filename: 'index.js',
    clean: true,
    library: {
      // type: 'commonjs', // 不支持 tree-shaking
      // type: 'commonjs2', // 不支持 tree-shaking
      type: 'commonjs-static', // 不支持 tree-shaking
      // type: 'module', // 这个也不支持 tree-shaking !!
    },
  },
  resolve: {
    extensions: ['.jsx', '.js'],
  },
  devtool: false,
  mode: 'development',
  plugins: [],
};
